import React from 'react'
import { Button } from 'antd'
import { roleCreate } from '@/service/role'

interface IRole {
  name: string
  auth: number[]
  description: string
}
const RoleManage: React.FC = () => {
  const handleCreate = async (values: IRole): Promise<void> => {
    console.log(1111)
    const result = await roleCreate(values)
    console.log(result.id)
  }
  const handleClick = (): void => {
    void handleCreate({ name: 'test', auth: [1], description: '第一个' })
  }
  return (
    <>
      <Button onClick={handleClick}>RoleManage</Button>
    </>
  )
}

export default RoleManage
